/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
#ifndef _AlarmBalloon_
#define _AlarmBalloon_

#include "picking/picking.hpp"
#include "AlarmClient.hpp"
#include "picking/glutils.hpp"
#include "GLDisplay.hpp"
#include "MuRo_QuestionFrame.h"
#include "MuRo_AlarmFrame.h"


namespace MuRo
{

class CAlarmDevice;
  
class CAlarmBalloon : public CGLPickable, public CGLPickCallback
{
  public:
    CAlarmBalloon(CAlarmDevice *device, MaCI::Alarm::CAlarmClient *client, 
                  const MaCI::Alarm::CAlarmData data);
    ~CAlarmBalloon();
    
    void Draw(const TViewParams &view);
    
    void DrawPickable();
    
    void SetPickingContext(CGLPickingContext *context);
    
    void OnPick(TGLPickEvent event);
    
    void Expand(bool expand);
    
    void SetPosition(float x, float y);
    
    void SetSourcePosition(float x, float y);
    
    int GetWidth();
    
    int GetHeight();
    
    void Destroy();
    
    MaCI::Alarm::CAlarmClient *client;
    const MaCI::Alarm::CAlarmData data;
    
  private:
    //bool expanded;
    float posX, posY, sourceX, sourceY;
    //float width, height;
    CAlarmDevice *device;
    
    TViewParams view;
    CGLPickingContext *pickingContext;
    wxWindow *messageBox;
};

}
#endif
